package com.hk.core.jdbc.tenants;

import com.hk.commons.util.StringUtils;

/**
 * @author Kevin
 * @date 2024-03-27 21:37
 */
@FunctionalInterface
public interface TenantIdResolver {

    String resolve(String value);

    static TenantIdResolver fixed() {
        return value -> StringUtils.startsWith("${", value) && StringUtils.endsWith("}", value) ? null : value;
    }

}
